Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Prometheus from control plane #87

Closed
wants to merge 3 commits into from
Closed

Conversation

voximity
Copy link
Collaborator

Targets:

  • Control plane should spin up and manage a Prometheus container
  • Prometheus container should actively scrape agents running nodes
  • Guarantee outcomes using PromQL queries

@Meshiest
Copy link
Contributor

I think we may want the option to connect to an existing Prometheus container so the control plane can be run in a container without needing docker in docker mounts

@voximity
Copy link
Collaborator Author

I think we may want the option to connect to an existing Prometheus container so the control plane can be run in a container without needing docker in docker mounts

That's fine, but the control plane needs to be able to write to the Prometheus config file wherever the Prometheus is, so currently having it in Docker only is the most feasible

@Meshiest
Copy link
Contributor

Meshiest commented Mar 30, 2024

https://prometheus.io/docs/guides/file-sd/

the Prometheus instance will listen for changes to the file and automatically update the scrape target list

scrape_configs:
- job_name: 'node'
  file_sd_configs:
  - files:
    - 'targets.json'

allows for targets.json to have

[
  {
    "labels": {
      "job": "node"
    },
    "targets": [
      "localhost:9100"
    ]
  }
]

@Meshiest
Copy link
Contributor

this looks more like what we want https://github.com/prometheus/pushgateway

@voximity
Copy link
Collaborator Author

this looks more like what we want https://github.com/prometheus/pushgateway

I think we would have to modify snarkOS to make this work since they use a scrape exporter by default. The metrics exporter they use does support push gateways though

@Meshiest
Copy link
Contributor

agent can scrape the node locally (with env + own node id context), then push it to a desired service

@voximity
Copy link
Collaborator Author

voximity commented Apr 2, 2024

Closing as we've decided to not make the control plane spin up its own Prometheus instance and instead let agents optionally use push gateway to a Prometheus server specified by the control plane.

@voximity voximity closed this Apr 2, 2024
@gluax gluax deleted the feat-prometheus branch May 29, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants